<?php
header("Content-Type: text/html; charset=UTF-8");
session_start();
//时区设置
error_reporting(0);
date_default_timezone_set('PRC');
//first find root  不用查找 在DEFINE里面已经定义根目录
define('DIR_ROOT_P',dirname(dirname(__FILE__)));
//define config 
define(	'DOMAIN_ROOT'	,	'http://localhost/teachplatform/');//根域名
define(	'DBPREFIX'		,	'nettteach_'						);//数据表前缀
define(	'SHA'			,	'nettteach_'						);//主数据库前缀
define(	'PREFIX'		,	'nettteach_'	);//附加加密字符
//define file
define('FILE_INDEX','index.php');
//define table
define('TABLE_STUDENT'	                ,	PREFIX. 'student'	                );
define('TABLE_COURSEWARE'	                ,	PREFIX. 'courseware'	                );
include_once(DIR_ROOT_P.'/include/functions.php');
//count script time
$scriptbegintime=fs_getmicrotime();
/*if (fs_get_value("do")!= 'do_edit_question' && fs_get_value("do")!= 'addnew'  && fs_get_value("sign_type")!= 'MD5' && fs_get_value("do")!= 'page')
{
	include_once(DIR_ROOT_P.'/'.DIR_INCLUDE.'/checkpostandget.php');	//过滤非法字符 防止sql 注入
}*/
//加载MYSQL操作类
include_once(DIR_ROOT_P.'/include/fooee.class.mysql.php');
include(DIR_ROOT_P.'/config.php');
//初始化mysql类
$db = new db();
$db -> connect($_DB);

//注册一些session变量
if($_SESSION['sid']=='')
{
    $_SESSION['sid'] ='';
    $_SESSION['username'] ='';
    $_SESSION['type'] ='';
    $_SESSION['lastlogintime'] ='';
    $_SESSION['realname'] ='';
    $_SESSION['logintimes'] ='';
}
?>